<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>流程跟踪图</title>
    <script type="text/javascript" src="static/workflow/js/jquery.min.js"></script>
    <script type="text/javascript" src="static/workflow/js/underscore.min.js"></script>
    <!--流程跟踪图引入的JS-->
    <script type="text/javascript" src="static/workflow/bpm/WorkflowDesigner/js/StatusUi.js"></script>
    <link href="static/workflow/bpm/WorkflowDesigner/css/common.css" media="screen" rel="stylesheet" type="text/css"/>
    <link href="static/workflow/bpm/WorkflowDesigner/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css"/>
</head>
<body>
    <div id = "graphContainerPanel" title="流程跟踪图" style="overflow:auto;height:500px;">
        <!--流程跟踪图展示区域-->
        <div id="graphContainer"	style="position:relative;overflow:auto;width:100%;height:100%;">
        </div>
    </div>
    <!-- <br/>
    <div id="manual" title="人工节点执行信息" style="overflow:auto;height:500px;">
        <b id="manualTip" style="padding-left: 5px;font-weight: bold;font-size: 15px">节点执行信息</b>
        <table id="manualTable" class="table">
            <thead>
            <tr>
            <th width="20%">执行人</th>
            <th width="20%">状态</th>
            <th width="20%">开始时间</th>
            <th width="20%">结束时间</th>
            <th width="20%">持续时间</th>
            </tr>
            </thead>
            <tbody id="manualTableBody">

            </tbody>
        </table>
    </div> -->
</body>
<script type="text/javascript">
    function getProcessInstaceId() {
        var url = window.location.href; //获取url中"?"符后的字串
        var processInstanceId = "";
        if (url.indexOf('?') != -1) {
            url = url.split("?")[1];
        }
        if (url) {
            var strs = url.split('&');
            for (var i = 0; i < strs.length; i++) {
                var srtArry = strs[i].split('=');
                if(srtArry[0] == 'processInstanceId'){
                    processInstanceId = srtArry[1];
                    break;
                }
            }
        }
        return processInstanceId;
    }

    $(function () {
        var eu = new EditorUi(new Editor(),$('#graphContainer')[0]);

        var processInstanceId = getProcessInstaceId();
        if(processInstanceId == ""){
            return;
        }
        eu.showTraceGraph(processInstanceId);
    });
</script>
</html>